package command;

import command.garageDoor.GarageDoor;
import command.garageDoor.GarageDoorOpenCommand;
import command.light.Light;
import command.light.LightOnCommand;

/**
 * Created by lenovo on 2018/1/2.
 */
public class RemoteControlTest {
    public static void main(String[] args){
        SimpleRemoteControl remote=new SimpleRemoteControl();
        Light light=new Light();
        LightOnCommand lightOn=new LightOnCommand(light);
        GarageDoor garageDoor=new GarageDoor();
        GarageDoorOpenCommand garageDoorOpenCommand=new GarageDoorOpenCommand(garageDoor);
        remote.setCommand(lightOn);
        remote.buttonWasPressed();
        remote.setCommand(garageDoorOpenCommand);
        remote.buttonWasPressed();
    }
}
